home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
ca29_3.zip
/
LEARN.DOC
< prev
next >
Wrap
Text File
|
1992-11-30
|
21KB
|
825 lines
COM-AND LEARN Script
---------------------------------------
COM-AND LEARN Script
Script generator (learning) for COM-AND
---------------------------------------
COM-AND, and the LEARN script are copyright 1992 by CABER Soft-
ware. COM-AND is distributed freely and may be copied by anyone
for any number of machines, for purposes of evaluation. The
author offers COM-AND and its accessory programs as "shareware".
If you USE the program after evaluating it, you MUST pay for it.
The complete user license and registration information is to be
found in the file REGISTER.DOC. Limitations on redistribution
of COM-AND are set out in the file VENDOR.DOC. These two files
are included with the COM-AND program release.
CABER Software
R. (Scott) McGinnis
P.O. Box 3607 Mdse Mart
Chicago, IL 60654-0607
GEnie, Delphi: TARTAN
CIS .......... 73147,2665
Internet ..... 73147.2665@compuserve.com
Version 1.0: 921012
COM-AND LEARN Script
Table of Contents
-----------------
I. Introduction .............................................. page 1
A. What is COM-AND? ........................................ page 1
B. The LEARN script ........................................ page 1
II. Running LEARN .............................................. page 2
III. LEARN function ............................................. page 3
IV. LEARN commands ............................................. page 6
ESC Exit LEARN ......................................... page 6
F1 Load accessory ..................................... page 6
F2 Execute script ..................................... page 6
F3 Change drive:subdir ................................ page 6
F4 Set default download subdir ........................ page 6
F5 Toggle line/char ................................... page 7
F6 Toggle learn hold .................................. page 7
F7 Toggle logging file ................................ page 7
F9 Toggle log hold .................................... page 7
F10 Information screen ................................. page 7
Alt-C Clear screen ....................................... page 8
Alt-E Toggle echo ........................................ page 8
Alt-D Dial ............................................... page 8
Alt-G Toggle blankline ................................... page 8
Alt-H Hangup ............................................. page 8
Alt-L Toggle 25/43 ....................................... page 8
Alt-Q Toggle CR/CRLF ..................................... page 8
Alt-N Encrypt/decrypt .................................... page 9
Alt-P Set comm parms ..................................... page 9
Alt-Z Toggle masking ..................................... page 9
PgUp Upload ............................................. page 9
PgDn Download ........................................... page 10
Alt-F10 Shell to DOS ....................................... page 10
Alt-0/9 Send macro ......................................... page 10
Ctl-End Send break ......................................... page 10
Ctl-Prt Toggle print ....................................... page 10
V. Modifying Scripts .......................................... page 11
VI. Program Requirements ....................................... page 12
VII. Program and Author Information ............................ page 13
Version 1.0: 921012
COM-AND LEARN Script Page 1
I. Introduction
A. What is COM-AND?
COM-AND for the IBM PC and compatibles is a communications
program for use by itself, or for use with several integrated
accessory programs (which themselves may be used independently of
COM-AND). COM-AND provides standard comm program functions: a
dialing directory, macros, disk logging, binary and ASCII file
transfers, scripted execution and the usual schtick.
B. The LEARN script
LEARN.CMD was created at Mike Todd's request, to aid in the
writing of scripts. LEARN generates a script by 'comprehending'
(in a limited sense) the actions taken. The generated script
mimics the learned session. LEARN provides many COM-AND functions
(e.g. DIAL (Alt-D), Accessories (F1) macros (Alt-0/9), and so on)
within its environment.
This document discusses the function of the LEARN.CMD script.
Version 1.0: 921012
COM-AND LEARN Script Page 2
II. Running LEARN
The LEARN script is invoked through COM-AND's script processor (F2).
When invoked, LEARN first asks for a script file name. When this
request is satisfied, LEARN then displays a screen with:
. a received text area
. a keyboard buffer
. a summary of available commands
. a status line
The LEARN script adjusts to the screen size in use. You may wish to
use LEARN in 43 line mode generally (if you have an EGA or VGA adap-
tor), to provide a maximum space for received text.
LEARN logs the initial state of COM-AND (options, comm parms, and so
on) to the output file when the file is created. If you enter LEARN
with 43 screen lines, a SET 43 is placed at the beginning of the
output file. You may edit this out after exiting LEARN, or during
the LEARN session.
Note: any subdirectory/drive change you perform within LEARN is
'cancelled' when you exit LEARN. Similarly, the screen from which
LEARN was executed is restored.
Version 1.0: 921012
COM-AND LEARN Script Page 3
III. LEARN function
LEARN follows your actions. When a key is pressed, its equivalent
is displayed in the keyboard display. When RETURN is pressed, the
entire line (limited to 60 characters) is transmitted, and WAITFOR/
TRANSMIT statements are written to the output file. For example:
WAITFOR "<last received text>"
;*IF NOT WAITFOR GOTO ...
TRANSMIT "<what was typed>"
LEARN writes a WAITFOR, a comment, and a TRANSMIT statement to the
output file. The WAITFOR waits for the last line of text received.
The comment is to remind the potential author that the WAITFOR may
time out, and the action should be tested. The TRANSMIT sends the
equivalent of what was typed out the comm port.
Should no text have been received between the last transmit and the
current transmit, LEARN write the following comments to the output
file:
;
; WAITFOR may be needed here
;
Initially, LEARN is in a 'LINE' mode. Text is buffered, and trans-
mitted only when RETURN is pressed. Some BBSes use single characters
and control characters as commands. LEARN may set to a 'character'
mode with the F5 toggle (see below). In 'CHAR' mode, each character
typed results in the WAITFOR/comment/TRANSMIT statements described
above.
Special functions (such as Alt-D dialing, macros, and so on) may be
performed within LEARN. The appropriate script statements are added
to the output file. The special functions LEARN supports are listed
in the following chapter.
When LEARN is exited, the output file is closed, and COM-AND is reset
to a condition similar to that when LEARN was entered. The real work
starts when LEARN is exited and you must edit the script!
Version 1.0: 921012
COM-AND LEARN Script Page 4
III. LEARN function (continued)
LEARN cannot capture some actions taken on-line. For example, when
dialing PLINK direct, connecting to PLINK's modems requires one step
LEARN cannot accomodate. For example:
... initial state settings
LEGEND "Script learned: "*"08/10/1989"
PRINTER OFF
SET CHAT OFF
SET KBDB OFF
; Dialing
DIAL "1"
IF FAILED
EXIT
ENDIF
WAITFOR "2400"
;*IF NOT WAITFOR GOTO ...
TRANSMIT "!"
;
; WAITFOR may be needed here
;
TRANSMIT "!"
WAITFOR "USER ID:"
;*IF NOT WAITFOR GOTO